import request from '@/utils/request';

/**
 * 创建token
 * @param {*} param0
 */
export const createToken = params => {
  return request({
    url: '/admin/token/login',
    data: params,
    method: 'post'
  });
};

/**
 * 刷新token
 */
export const refreshToken = () => {
  return request({
    url: '/admin/token/refresh',
    method: 'post'
  });
};

/**
 * 销毁token
 */
export const destroyToken = () => {
  return request({
    url: '/admin/token/destroy',
    method: 'post'
  });
};

/**
 * 获取token列表
 */
export const tokenList = () => {
  return request({
    url: '/admin/token/list',
    method: 'post'
  });
};

/**
 * 获取token信息
 */
export const getTokenInfo = () => {
  return request({
    url: '/admin/token/info',
    method: 'post'
  });
};
